package com.hanxiaozhang.order.config;

import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Scope;


/**
 * 〈一句话功能简述〉<br>
 * 〈Feign上传文件配置类〉
 *
 * @author hanxinghua
 * @create 2020/7/2
 * @since 1.0.0
 */
// @Configuration
public class FeignMultipartConfig {

    /**
     * Feign Spring 表单编码器
     *
     * @return
     */
    @Bean
    @Primary
    @Scope("prototype")
    public Encoder multipartEncoder(){
        return new SpringFormEncoder();
    }

}
